<html>

<head>

<?php

include "../includes/constants.php";

?>

<title>EQ Emu - <?php echo $_GET["filename"];?></title>

</head>

<body>

<?php

if ($_GET["filename"] != "") {
	$query = "SELECT txtfile FROM books WHERE name='" . $_GET["filename"] . "'";
	$result = mysql_query($query,$db);
	if ($db_row = mysql_fetch_array($result)) {
	//	echo "<pre>\n";
		echo str_replace("`","<br>\n",$db_row["txtfile"]) . "\n";
	//	echo "</pre>\n";
	} else {
		echo "Unable to find book: \"" . $_GET["filename"] . "\"";
	};
} else {
	echo "Unable to find book: \"" . $_GET["filename"] . "\"";
};

?>

</body>

</html>